package chuishop.yiqimaicai.service.Impl;

import chuishop.yiqimaicai.mapper.OrderpickMapper;
import chuishop.yiqimaicai.pojo.Orderpick;
import chuishop.yiqimaicai.service.OrderpickService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderpickServiceImpl implements OrderpickService {


    @Autowired
    private OrderpickMapper orderpickMapper;

    @Override
    public List<Orderpick> findAllOrderpick() {
        return orderpickMapper.findAllOrderpick();
    }

    @Override
    public List<Orderpick> findOrderpickById(Integer pid) {
        return orderpickMapper.findOrderpickById(pid);
    }

    @Override
    public boolean delOrderpick(String[] ids) {
        if(orderpickMapper.delOrderpick(ids)>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean addOrderpick(Orderpick orderpick) {
        if(orderpickMapper.addOrderpick(orderpick)>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean updateOrderpick(Orderpick orderpick) {
        if(orderpickMapper.updateOrderpick(orderpick)>0){
            return true;
        }
        return false;
    }
}
